package com.wmlt.entity;

/**
 * @author liyuxiang
 * @description: 消息实体类
 * @param:
 * @return:
 * @date: 2021/4/10 11:48 上午
 */
public class Message {
    private String senderUserId;//发送人id
    private String addresseeUserId;//接收人id
    private String message;//消息内容
    private String senderTime;//发送时间
    private int isRead;//是否已读   0未读 1已读
    private User user;
    private User sendUser;//发送人对象
    private User addresseeUser;//接收人对象

    public Message(String senderUserId, String addresseeUserId, String message, String senderTime, int isRead, User user, User sendUser, User addresseeUser) {
        this.senderUserId = senderUserId;
        this.addresseeUserId = addresseeUserId;
        this.message = message;
        this.senderTime = senderTime;
        this.isRead = isRead;
        this.user = user;
        this.sendUser = sendUser;
        this.addresseeUser = addresseeUser;
    }

    public Message() {
    }
    public Message(String senderUserId, String addresseeUserId, String message, String senderTime, int isRead){
        this.senderUserId = senderUserId;
        this.addresseeUserId = addresseeUserId;
        this.message = message;
        this.senderTime = senderTime;
        this.isRead = isRead;
    }

    public String getSenderUserId() {
        return senderUserId;
    }

    public void setSenderUserId(String senderUserId) {
        this.senderUserId = senderUserId;
    }

    public String getAddresseeUserId() {
        return addresseeUserId;
    }

    public void setAddresseeUserId(String addresseeUserId) {
        this.addresseeUserId = addresseeUserId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getSenderTime() {
        return senderTime;
    }

    public void setSenderTime(String senderTime) {
        this.senderTime = senderTime;
    }

    public int getIsRead() {
        return isRead;
    }

    public void setIsRead(int isRead) {
        this.isRead = isRead;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public User getSendUser() {
        return sendUser;
    }

    public void setSendUser(User sendUser) {
        this.sendUser = sendUser;
    }

    public User getAddresseeUser() {
        return addresseeUser;
    }

    public void setAddresseeUser(User addresseeUser) {
        this.addresseeUser = addresseeUser;
    }

    @Override
    public String toString() {
        return "Message{" +
                "senderUserId='" + senderUserId + '\'' +
                ", addresseeUserId='" + addresseeUserId + '\'' +
                ", message='" + message + '\'' +
                ", senderTime='" + senderTime + '\'' +
                ", isRead=" + isRead +
                ", user=" + user +
                ", sendUser=" + sendUser +
                ", addresseeUser=" + addresseeUser +
                '}';
    }
}